<template>

	<div class="tarch_r">
		<!-- 搜索 -->
		<el-input placeholder="请输入版本号" v-model.trim="input" clearable @clear="clearChange" @change="changeEnter"> </el-input>
		<el-button type="primary" @click="search(input)">搜索</el-button>
	</div>

</template>

<script>
export default {
	data() {
		return {
			input: ''
		}
	},
	methods: {
		search(data) {
			this.$emit('searchOn' , data);
		},
		// 点击清除按键触发该函数
		clearChange(){
			this.$emit('clearChange');
		},
		// 失去焦点或者按回车触发事件
		changeEnter(val){
			this.$emit('changeEnter',val);
		}
	}
}
</script>

<style scoped>
.tarch_r{
	display: flex;
	width: 280px;
	height: 40px;
}
.el-input--suffix >>> .el-input__inner{
  border-radius: 5px 0 0 5px !important;
}

.el-button{ border-radius: 0 5px 5px 0;border: 0;height: 39.5px; }
</style>
